package cn.sciento.platform.infra.mapper;

import java.util.List;

import io.choerodon.mybatis.common.BaseMapper;

import org.apache.ibatis.annotations.Param;
import cn.sciento.platform.api.dto.CodeRuleDTO;
import cn.sciento.platform.domain.entity.CodeRule;

/**
 * <p>
 * 编码规则mapper
 * </p>
 *

 */
public interface CodeRuleMapper extends BaseMapper<CodeRule> {

    /**
     * 查询编码规则dtoList
     *
     * @param codeRule 编码规则
     * @return 编码规则dtoList
     */
    List<CodeRuleDTO> selectCodeRuleList(CodeRule codeRule);

    /**
     * 通过编码规则明细ID查询编码规则是否存在
     *
     * @param ruleDetailId 编码规则明细ID
     * @return 编码规则
     */
    CodeRule selectCodeRuleByDetailId(@Param("ruleDetailId") Long ruleDetailId);
}
